package com.bufbomb.datastore;

import com.google.appengine.api.datastore.Blob;
import com.google.appengine.api.datastore.Key;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class DataItem {
	
    @SuppressWarnings("unused")
	@PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;

    @SuppressWarnings("unused")
	@Persistent
    private int order;
    
    @Persistent
    private Blob blob;
    
    public DataItem(int order, Blob blob) {
    	this.order = order;
    	this.blob = blob;
    }
    
    public Blob getBlob()
    {
    	return this.blob;
    }
}
